import asyncio

# 除了运行asyncio.run在默认的事件循坏中运行外 可以创建自己的事件循环

def call_later():
    print("Call Later")

async def main():
    loop = asyncio.get_running_loop()
    loop.call_soon(call_later)
    await asyncio.sleep(1)

loop = asyncio.new_event_loop()
try:
    loop.run_until_complete(main())
finally:
    loop.close()